Skip to content

fix(persistence): Ensure messageLimit is respected in getChannelStates#2717

Merged
VelikovPetar merged 1 commit into
v10.0.0from
bug/ensure_message_limit_is_respected_when_fetching_channels
Jun 5, 2026
Merged

fix(persistence): Ensure messageLimit is respected in getChannelStates#2717
VelikovPetar merged 1 commit into
v10.0.0from
bug/ensure_message_limit_is_respected_when_fetching_channels

Conversation

@VelikovPetar

@VelikovPetar VelikovPetar commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

The messageLimit handling in the StreamChatPersistenceClient#getChannelStates was lost, most likely when merging master (with DB read optimisations) into v10.0.0. This PR restores the logic for forwarding the messageLimit to the getChannelStateByCid method.

Screenshots / Videos

NA

Summary by CodeRabbit

  • Improvements
    • Improved message pagination handling in channel conversations. When accessing paginated channels, message limits are now explicitly configured and applied during state loading, ensuring consistent and predictable behavior. Pagination settings are properly forwarded through all retrieval processes, with comprehensive testing to verify correct functionality.

@VelikovPetar VelikovPetar requested a review from a team June 3, 2026 13:56
@VelikovPetar VelikovPetar marked this pull request as ready for review June 3, 2026 13:56
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49227089-2ecb-49e7-bd0d-5b2d88a676e4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bug/ensure_message_limit_is_respected_when_fetching_channels

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.55%. Comparing base (583f7b6) to head (4271e5f).
⚠️ Report is 8 commits behind head on v10.0.0.

Additional details and impacted files
@@           Coverage Diff            @@
##           v10.0.0    #2717   +/-   ##
========================================
  Coverage    67.55%   67.55%           
========================================
  Files          408      408           
  Lines        24521    24522    +1     
========================================
+ Hits         16565    16566    +1     
  Misses        7956     7956           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@VelikovPetar VelikovPetar merged commit 08236f5 into v10.0.0 Jun 5, 2026
16 checks passed
@VelikovPetar VelikovPetar deleted the bug/ensure_message_limit_is_respected_when_fetching_channels branch June 5, 2026 08:51
@xsahil03x xsahil03x mentioned this pull request Jun 9, 2026
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants